package com.illtamer.infinite.sillage.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.illtamer.infinite.sillage.vo.HomeBlog;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.ibatis.type.UnknownTypeHandler;

import java.util.List;

@Data
@TableName("sillage_type")
@NoArgsConstructor
public class Type {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    // 级联关系字段
    @EqualsAndHashCode.Exclude
    @ToString.Exclude
    private List<HomeBlog> homeBlogs;

    public Type(Integer id) {
        this.id = id;
    }
}
